import { NgModule, ErrorHandler } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp,IonicModule,IonicErrorHandler } from 'ionic-angular';
import { MyApp } from './app.component';
import { HttpModule } from '@angular/http';
// import {Http} from '@angular/http';//引入Http服务
import {HttpService} from "../providers/HttpService";
import {StorageService} from "../providers/StorageService";
import {UserService} from "../providers/UserService";
import {AppContentService} from "../providers/AppContentService";


import { SportPage } from '../pages/sport/sport';
import { UsercenterPage } from '../pages/usercenter/usercenter';
import { HomePage } from '../pages/home/home';
import { TabsPage } from '../pages/tabs/tabs';
import { WelcomePage } from '../pages/welcome/welcome';
//登陆页、注册页
import {Signup} from '../pages/signup/signup';
import {Login} from '../pages/login/login';
import {SignOrlogin} from '../pages/sign-orlogin/sign-orlogin'
//活动发布页
import {PublishSport} from '../pages/publish-sport/publish-sport';
//活动详情页
import {SportDetailed} from '../pages/sport-detailed/sport-detailed';
//用户个人信息页
import {UserInfoPage} from '../pages/user-info/user-info'


import {UserInfo} from "../model/UserInfo";

import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import { Network } from '@ionic-native/network';

@NgModule({
  declarations: [
    MyApp,
    SportPage,
    UsercenterPage,
    HomePage,
    WelcomePage,
    SignOrlogin,
    Signup,
    Login,
    PublishSport,
    SportDetailed,
    TabsPage,
    UserInfoPage
  ],
  imports: [
    BrowserModule,
    HttpModule,
     IonicModule.forRoot(MyApp),
  //   // IonicModule.forRoot(MyApp,{
  //   //    tabsHideOnSubPages: 'true'         //隐藏全部子页面tabs
  //   // })
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,
    SportPage,
    UsercenterPage,
    HomePage,
    WelcomePage,
    SignOrlogin,
    Signup,
    Login,
    PublishSport,
    SportDetailed,
    TabsPage,
    UserInfoPage
  ],
  providers: [
    StatusBar,
    SplashScreen,
    {provide: ErrorHandler, useClass: IonicErrorHandler},
    HttpService,StorageService,UserService,AppContentService,//自定义请求服务
    Network,//网络
    UserInfo,
  ]
})
export class AppModule {}
